import request from '@/utils/request'
const fetchItems = (params = {}) => {
  return request.get('/itemLists', { params })
}
// 批量添加商品
const addItems = (params = {}) => {
  return request.post('/addItems', params)
}
// 删除 商品
const delItem = (id) => {
  return request.delete('/delItem', { params: { id } })
}
// 单个添加商品
const addItem = (params = {}) => {
  return request.post('/addItem', params)
}
// 修改商品
const updateItem = (params = {}) => {
  return request.put('/updateItem', params)
}
export {
  fetchItems,
  addItems,
  delItem,
  addItem,
  updateItem
}
